Issue Numbers with leading zeros calculate
incorrectly.
For example, in the Macromedia Firefly
FxGrid component, when a user enters a number with
a leading zero(s), an incorrect number is posted
to the field. If a user enters 011 in a numeric
field, then clicks on a different row to post the
change, the value put into the field is
9.
Reason In ActionScript, numbers with leading zeros
are interpreted as octal numbers. The octal number
system is a positional notation number system.
Just as the decimal system uses powers of 10 and
the binary system uses powers of 2, the octal
system uses power of 8 to determine the value of a
number's position. For example, the octal integer 011 is
interpreted as:
|
which is equal
to: |
so the decimal value
is: |
9 |
For more information on octal numbers try
http://www.tpub.com/neets/book13/53e.htm
or enter the keywords octal numbers into any
search engine.
Solution The Flash developer should check for a
leading zero in numeric entries and convert or
trim as appropriate.
|